(function () {
    'use strict';

    angular
    .module('app')
    .factory('APIInvoiceService', APIInvoiceService);

    APIInvoiceService.$inject = ['$http', '$q', '$timeout', 'CacheFactory', 'ENUM'];

    function APIInvoiceService($http, $q, $timeout, CacheFactory, ENUM) {

        var service = new APIEndpoint( $http, $q, $timeout, CacheFactory, 'APIInvoiceService' );

        service.typeList = function( params ) {
            return this.fetch( 'ecapi.coupon.list', params, false, function(res){
                return ENUM.ERROR_CODE.OK == res.data.code ? res.data.data : null;
            });
        };

        service.contentList = function( params ) {
            return this.fetch( 'ecapi.coupon.list', params, false, function(res){
                return ENUM.ERROR_CODE.OK == res.data.code ? res.data.data : null;
            });
        };

        service.statusGet = function( params ) {
            return this.fetch( 'ecapi.coupon.list', params, false, function(res){
                return ENUM.ERROR_CODE.OK == res.data.code ? res.data.data : null;
            });
        };

        return service;


    }

})();
